package org.winFame;

import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Pane;
import org.App;

public class PaneFrame {
    public static Pane pane = new Pane ();
    static {
        init();
    }
    public static void init() {
        pane.getChildren().addAll (
                HboxTop.hBox,
                WinShow.scrollPane
        );
        App.stage.widthProperty().addListener(new ChangeListener<Number>() {
            @Override
            public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
                pane.setPrefWidth((Double) newValue);
            }
        });

        App.stage.heightProperty().addListener(new ChangeListener<Number>() {
            @Override
            public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
                pane.setPrefHeight((Double) newValue);
            }
        });
    }
}
